<?php
/**
 * ExtCode class file
 *
 * @author TrueSoftware B.V. (The Netherlands)
 * @link http://www.ext4yii.com
 * @copyright Copyright 2007-2010 TrueSoftwareB.V. all rights reserved.
 * @license http://www.ext4yii.com/license/
 *          EVALUATION VERSION - NOT FOR COMMERCIAL USE OR DISTRIBUTION.
 * @version 0.7.2
 */
class ExtCode extends ExtWidget
{
    private $_brush='html';
    private $_collapse = 'false';
    private $_title=null;
    private $_clsname=null;

    public function parseNode(ExtHTMLParserNode $node,
        ExtASTWalker $astwalker)
    {
        $node->outertext = sprintf("<pre class='brush: %s;collapse: %s;%s;%s;'>%s</pre>",
                    $this->getBrush(),
                    $this->getCollapse(),
                    ($this->getTitle()!=null?'title:' . $this->getTitle():''),
                    ($this->getClsName()!=null?'class-name:' . $this->getClsName():''),
                    $node->innertext);
    }

    public function  isHTMLElement()
    {
        return true;
    }

    public function renderConfig($asobject = true)
    {
        return null;
    }

    public function  createContainer(ExtHTMLParserNode $node)
    {
        return null;
    }

    public function getClsName()
    {
        return $this->_clsname;
    }

    public function setClsName($value)
    {
        $this->_clsname = $value;
    }


    public function getBrush()
    {
        return $this->_brush;
    }

    public function setBrush($value)
    {
        $this->_brush = $value;
    }

    public function getCollapse()
    {
        return $this->_collapse;
    }

    public function setCollapse($value)
    {
        $this->_collapse = $value;
    }

    public function getTitle()
    {
        return $this->_title;
    }

    public function setTitle($value)
    {
        $this->_title = $value;
    }
}
?>
